﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dbPoll_Application.Models.Poll>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	dbPoll - Test
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript" src="../../Scripts/Poll-Test.js"></script>

    <div class="pageHeadingContainer"><h2 class="pageHeading">Test</h2></div>
    <div id="contentContainer">
    <%= Html.HiddenFor(m => m.pollID) %>
    <p><%= Html.ActionLink("Polls > ", "Index", "Poll", null, new { @class = "breadcrumb" })%><%= Model.name %></p>
        <div id="pageMenuContainer">
        <% var pollRoles = ViewData["pollRoles"] as ICollection<dbPoll_Application.Models.Role>;
           var pollAdministrator = new dbPoll_Application.Models.Role("Poll Administrator");
           var pollCreator = new dbPoll_Application.Models.Role("Poll Creator");
           var pollMaster = new dbPoll_Application.Models.Role("Poll Master"); %>
           <input id="canTest" type="hidden" value="<%=ViewData["canTest"] %>" />
            <ul id="pageMenu">
                <li><%= Html.ActionLink("Details", "Questions", new { pollID = Model.pollID }) %></li>
                <li id="runLink" <% if (Model.pollID < 0 || Model.questions.Count == 0) { %> class="none" <% } %>><%= Html.ActionLink("Run", "SetSession", new { pollID = Model.pollID }) %></li>
                <li>Test</li>
                <li><%= Html.ActionLink("Reports", "Reports", new { pollID = Model.pollID })%></li>
                <li><%= Html.ActionLink("Manage Hierarchy", "EntityHierarchy", new { pollID = Model.pollID })%></li>
            </ul>
        </div>
        <div id="testContainer">
            <div id="testContainerPadding">
                <div id="testContentContainer">
                    <div id="setDeviceID"><label for="deviceID">DeviceID: </label><input type="text" id="deviceID" name="deviceID" /><input type="button" id="setDeviceIDButton" value="Set" /><span id="setPollLocationErrorMessage"></span></div>
                    <div class="clear"></div>
                    <div id="testButtons"><input type="button" id="runTestPollButton" class="testButton" name="runTestPollButton" value="Run Test Poll" /><input type="button" id="respondByKeypadButton" class="testButton" name="respondByKeypadButton" value="Respond By Keypad" /><input type="button" id="respondByWebButton" class="testButton" name="respondByWebButton" value="Respond By Web" /></div>
                </div>
                <div id="respondInstructions">Instructions: enter the deviceID of your keypad (or a random deviceID if you do not have a keypad) and then press set.<br /><br />Use the buttons to launch the pages for running and responding to the poll. None of your responses will be used in the real poll.</div>
            </div>
        </div>
    </div>

</asp:Content>
